using Boo.Lang;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;

[Serializable]
public class setparts : MonoBehaviour
{
	[Serializable]
	[CompilerGenerated]
	internal sealed class _0024Start_0024466 : GenericGenerator<WaitForSeconds>
	{
		internal setparts _0024self__0024468;

		public _0024Start_0024466(setparts self_)
		{
			_0024self__0024468 = self_;
		}

		public override IEnumerator<WaitForSeconds> GetEnumerator()
		{
			return new _0024(_0024self__0024468);
		}
	}

	public GameObject[] plates;

	public GameObject[] colliders;

	public GameObject[] disks;

	public GameObject[] bases;

	public IEnumerator Start()
	{
		return new _0024Start_0024466(this).GetEnumerator();
	}

	public void check()
	{
		int @int = PlayerPrefs.GetInt("AttackState");
		int int2 = PlayerPrefs.GetInt("DiskState");
		int int3 = PlayerPrefs.GetInt("BaseState");
		int int4 = PlayerPrefs.GetInt("ChipState");
		load(@int, int2, int3, int4);
	}

	public void load(int attackState, int diskState, int baseState, int chipState)
	{
		if (chipState > 0)
		{
			for (int i = 0; i < plates.Length; i++)
			{
				if ((bool)plates[i])
				{
					if (chipState - 1 == i)
					{
						plates[i].active = true;
					}
					else
					{
						plates[i].active = false;
					}
				}
			}
			PlayerPrefs.SetInt("ChipState", chipState);
		}
		if (attackState > 0)
		{
			for (int j = 0; j < colliders.Length; j++)
			{
				if ((bool)colliders[j])
				{
					if (attackState - 1 == j)
					{
						colliders[j].active = true;
					}
					else
					{
						colliders[j].active = false;
					}
				}
			}
			PlayerPrefs.SetInt("AttackState", attackState);
		}
		if (diskState > 0)
		{
			for (int k = 0; k < disks.Length; k++)
			{
				if ((bool)disks[k])
				{
					if (diskState - 1 == k)
					{
						disks[k].active = true;
					}
					else
					{
						disks[k].active = false;
					}
				}
			}
			PlayerPrefs.SetInt("DiskState", diskState);
		}
		if (baseState <= 0)
		{
			return;
		}
		for (int l = 0; l < bases.Length; l++)
		{
			if ((bool)bases[l])
			{
				if (baseState - 1 == l)
				{
					bases[l].active = true;
				}
				else
				{
					bases[l].active = false;
				}
			}
		}
		PlayerPrefs.SetInt("BaseState", baseState);
	}

	public void Main()
	{
	}
}
